import { coralClassControllerFindAll } from "@/app/servers/api/coralClass";
import CoralClassDetail from "./coral-class-detail";

export default async function CoralClassPage() {
  const { data } = await coralClassControllerFindAll();
  const handleJsonCoralClassList = data.map((el) => {
    return {
      ...el,
      questionJson: JSON.parse(el.questionJson),
    };
  });
  return <CoralClassDetail classList={handleJsonCoralClassList} />;
}
